#!/usr/bin/python

from vateblog.model.BlogInfo import BlogInfo
from vateblog.model.Post import Post

class DataStore:

	@classmethod
	def get_blog_info(cls):
		ret = BlogInfo.all().get()
		if ret is None:
			ret = BlogInfo(
				name = "Vate Blog",
				description="a blog system on Google App Engine",
				number_of_posts_per_page=10,
				theme="default"
			)
		return ret

    @classmethod
    def get_post_by_id(cls, pid):
        return Post.get_by_id(pid)
